/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package bean;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpSession;

/**
 *
 * @author Administrator
 */
@ManagedBean
@RequestScoped
public class AdminSearchActionBean {
    private String content;
    private String chooseAction;

    public String getChooseAction() {
        return chooseAction;
    }

    public void setChooseAction(String chooseAction) {
        this.chooseAction = chooseAction;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
    public String searchAction(){
        HttpSession session = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false);
        session.setAttribute("ContentString", content);
        session.setAttribute("ChooseActionString", chooseAction);
        return "searchresult.xhtml";
    }
    /** Creates a new instance of AdminSearchActionBean */
    public AdminSearchActionBean() {
    }

}
